/* 整个项目api的统一管理 */
import request from "./request";
//请求首页左侧的表格的数据
export default {
    //默认mock为false
    getTableData(){
        return request({
            url:'/home/getTableData',//false
            // url: '/home/getTable',//true
            // url: "https://apifoxmock.com/m1/4068509-0-default/api/home/getTable",
            method:"get",
            // mock:true,
        });
    },
    getCountData() {
        return request({
            url: '/home/getCountData',
            //改为:https://localhost:8080/getCountData
            method: "get",
        });
    },
    getChartData() {
        return request({
            url: '/home/getChartData',
            method: "get",
        });
    },
    getUserData(data) {
        return request({
            url: '/home/getUserData',
            method: "get",
            data,
        });
    },
    deleteUser(data) {

        return request({
            url: '/user/deleteUser',
            method: "get",
            data,
        });
    },
    addUser(data) {
        
        
        return request({
            url: '/user/addUser',
            method: "post",
            data,
        });
    },
    editUser(data) {
        
        
        return request({
            url: '/user/editUser',
            method: "post",
            data,
        });
    },
    getMenu(params){
        return request({
            url:'/permission/getMenu',
            method:'post',
            data:params
        })
    },
    getNCardData(){
        return request({
            url:'/navigation/getNCardData',
            method:'get',
            // data:params
        })
    },
    editNCardData(data) {
        
        
        return request({
            url: '/navigation/editNCardData',
            method: "post",
            data,
        });
    },
    deleteNCardData(data) {
        return request({
            url: '/navigation/deleteNCardData',
            method: "get",
            data,
        });
    },
    addNCardData(data) {
        return request({
            url: '/navigation/addNCardData',
            method: "post",
            data,
        });
    },
}